import { createRouter, createWebHistory, type RouteRecordRaw } from 'vue-router';
import Home from '../views/Home.vue';
import List from '../views/List.vue';
import Article from '../views/Article.vue';

const routes: Array<RouteRecordRaw> = [
  {
    path: '/',
    name: 'Home',
    component: Home
  },
  {
    path: '/list',
    name: 'List',
    component: List
  },
  {
    path: '/article/:id',
    name: 'Article',
    component: Article
  }
];

const router = createRouter({
  history: createWebHistory(),
  routes
});

export default router;
